solve_lu Interface

public interface solve_lu

Module Procedures

private pure function solve_lu_mtx(a, ipvt, b) result(x)

Solves a system of LU-factored equations.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: a

The N-by-N LU factored matrix as output by lu_factor.

integer(kind=int32), intent(in), dimension(:) :: ipvt

The N-element pivot array as output by lu_factor.

real(kind=real64), intent(in), dimension(:,:) :: b

The N-by-NRHS right-hand-side matrix.

Return Value real(kind=real64), allocatable, dimension(:,:)

The N-by-NRHS solution matrix.

private pure function solve_lu_mtx_cmplx(a, ipvt, b) result(x)

Solves a system of LU-factored equations.

Arguments

Type IntentOptional Attributes Name
complex(kind=real64), intent(in), dimension(:,:) :: a

The N-by-N LU factored matrix as output by lu_factor.

integer(kind=int32), intent(in), dimension(:) :: ipvt

The N-element pivot array as output by lu_factor.

complex(kind=real64), intent(in), dimension(:,:) :: b

The N-by-NRHS right-hand-side matrix.

Return Value complex(kind=real64), allocatable, dimension(:,:)

The N-by-NRHS solution matrix.

private pure function solve_lu_vec(a, ipvt, b) result(x)

Solves a system of LU-factored equations.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: a

The N-by-N LU factored matrix as output by lu_factor.

integer(kind=int32), intent(in), dimension(:) :: ipvt

The N-element pivot array as output by lu_factor.

real(kind=real64), intent(in), dimension(:) :: b

The N-element right-hand-side array.

Return Value real(kind=real64), allocatable, dimension(:)

The N-element solution array.

private pure function solve_lu_vec_cmplx(a, ipvt, b) result(x)

Solves a system of LU-factored equations.

Arguments

Type IntentOptional Attributes Name
complex(kind=real64), intent(in), dimension(:,:) :: a

The N-by-N LU factored matrix as output by lu_factor.

integer(kind=int32), intent(in), dimension(:) :: ipvt

The N-element pivot array as output by lu_factor.

complex(kind=real64), intent(in), dimension(:) :: b

The N-element right-hand-side array.

Return Value complex(kind=real64), allocatable, dimension(:)

The N-element solution array.

private pure function csr_lu_solve(lu, ju, b) result(x)

Solves a linear system using an LU decomposition.

Arguments

Type IntentOptional Attributes Name
class(msr_matrix), intent(in) :: lu

The LU matrix.

integer(kind=int32), intent(in), dimension(:) :: ju

The row tracking array.

real(kind=real64), intent(in), dimension(:) :: b

The right-hand side.

Return Value real(kind=real64), allocatable, dimension(:)

The solution.